package com.ai.module.suno.domain.bo;

import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @author: heJinQin
 * @create: 2024-04-27 01:32
 * @description:

 **/
@Data
public class SunoInfoTask {

    private String id;

    private String userId;

    private String robotId;

    private String prompt;

    @JsonProperty("video_url")
    private String videoUrl;

    @JsonProperty("audio_url")
    private String audioUrl;

    @JsonProperty("image_url")
    private String imageUrl;

    @JsonProperty("image_large_url")
    private String imageLargeUrl;

    @JsonProperty("is_video_pending")
    private Boolean isVideoPending;

    @JsonProperty("major_model_version")
    private String majorModelVersion;

    @JsonProperty("model_name")
    private String modelName;

    @JsonProperty("metadata")
    private SunoMetadata metadata;

    @JsonProperty("is_liked")
    private  boolean isLiked;

    @JsonProperty("continue_at")
    private String continueAt;

    @JsonProperty("reaction")
    private String reaction;

    @JsonProperty("created_at")
    private String createdAt;

    private String status;

    @JsonProperty("title")
    private String title;

    @JsonProperty("play_count")
    private int playCount;

    @JsonProperty("upvote_count")
    private int upvoteCount;

    @JsonProperty("is_public")
    private int isPublic;

    @Data
    private class SunoMetadata {

        private String tags;

        private String prompt;

        @JsonProperty("gpt_description_prompt")
        private String gptDescriptionPrompt;

        @JsonProperty("audio_prompt_id")
        private String audioPromptId;

        private List<SunoHistory> history;

        @JsonProperty("concat_history")
        private String concatHistory;

        private String type;

        @JsonProperty("error_type")
        private String errorType;

        @JsonProperty("error_message")
        private String errorMessage;
    }

    @Data
    public static class SunoHistory {

        private String id;

        @JsonProperty("continue_at")
        private String continueAt;
    }


}
